<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Loads a font definition</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.swffont.html">SWFFont</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="swffont.getascent.html">SWFFont::getAscent</a></div>
 <div class="up"><a href="class.swffont.html">SWFFont</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="swffont.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SWFFont::__construct</h1>
  <p class="verinfo">(PHP 5 &lt;= 5.3.0, PECL ming SVN)</p><p class="refpurpose"><span class="refname">SWFFont::__construct</span> &mdash; <span class="dc-title">Loads a font definition</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-swffont.construct-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>SWFFont::__construct</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   )</div>

  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的
PHP 发布版本中未通知就被修改。使用本函数风险自担 。</p></div>
  <p class="para">
   If <em><code class="parameter">filename</code></em> is the name of an FDB file 
   (i.e., it ends in &quot;.fdb&quot;), load the font definition found in said 
   file. Otherwise, create a browser-defined font reference. 
  </p>
  <p class="para">
   FDB (&quot;font definition block&quot;) is a very simple wrapper for the SWF DefineFont2
   block which contains a full description of a font. One may create FDB files from 
   SWT Generator template files with the included makefdb utility- look in the 
   util directory off the main ming distribution directory. 
  </p>
  <p class="para">
   Browser-defined fonts don&#039;t contain any information about the font other 
   than its name. It is assumed that the font definition will be provided by
   the movie player. The fonts _serif, _sans, and _typewriter should always 
   be available. For example: 
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$f&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">newSWFFont</span><span style="color: #007700">(</span><span style="color: #DD0000">"_sans"</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

   will give you the standard sans-serif font, probably the same as what you&#039;d get
   with <em>&lt;font name=&quot;sans-serif&quot;&gt;</em> in HTML.
  </p>
  <p class="para">

  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.swffont.html">SWFFont</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="swffont.getascent.html">SWFFont::getAscent</a></div>
 <div class="up"><a href="class.swffont.html">SWFFont</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
